#include <iostream>
#include "status.h"
#include "stack.h"
using namespace std;

int main()
{
	Stack<char> stack;
	cout<<"please input: ";
	model_match(stack);
	
	system("pause"); 
}

bool model_match(Stack<char> & stack)
{
	stack.ClearStack();
	char ch;
	cin.get(ch);
	while(ch != '@' && ch != '&')
	{
		stack.Push(ch);
		cin.get(ch);
	}
	if(ch == '@')
		return false;
		
	cin.get(ch);
	while(ch != '@')
	{
		char tmp;
		stack.Pop(tmp);
		if(tmp != ch)
			return false;
		cin.get(ch);
	}
	
	if(stack.StackEmpty())
		return true;
		
	return false;
}